# @Time : 2025-01-06 15:03
# @Author : Fioman 
# @Phone : 13149920693
"""

"""
from common.datetime_helper import get_date_only
from db_tool.db_config import TableName, TableRegister

tableName: str = TableName.workingInfos.name
initData = {
    "key": "1",
    "orderUsedKey": "defaultInit",  # 工作工单key
    "orderUsedId": "defaultInit",  # 工作工单料号
    "pnlSetId": "PNL001",  # Pnl编号
    "workIndex": 0,  # 物料编号
    "tableUsed": 0,  # 台布使用时长
    "tableStartDay": get_date_only(),
    "cutterLifeUsed": 0,  # 铡刀(裁切刀的使用寿命)
    "cutterLifeStartDay": get_date_only(),
    "cutterKnifeName": "Hd_Cutter_2024",
    "cutAreas": 0,
    "cutSpeed": 800,
    "dragSpeed": 500,
    "cutDeep": 800,
    "finishedCount": 0,  # 已完成数量
    "indexMax": 0,  # 板子的最大编号
    "knifeMax": 40000,  # 刀片最大寿命,单位是米(m)
    "knifeUsed": 0,
}
TableRegister.register_table(tableName, initData)

if __name__ == '__main__':
    from db_tool.db_config import re_init_table

    # 重新创建表结构,或者新增表字段之后,重新初始化表内容,谨慎使用
    re_init_table(tableName, initData)
